const errorTypes = require('../constants/error-types');

const errorHandle = (err, ctx) => {
  console.log(err);
  ctx.status = err.statusCode;
  ctx.body = {
    errCode: err.errorCode,
    errorMsg: err.errorMsg,
  };
};

module.exports = errorHandle;
